package com.offcn.controller;

import com.offcn.service.MyService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("mycontyroller")
public class MyController {

    @Autowired
    private MyService myService;

    @RequestMapping("add")
    public String add(){
        myService.add("test001",100);
        return "ok";
    }
    @RequestMapping("update")
    public String update(){
        myService.update(100);
        return "ok";
    }
    @RequestMapping("delete")
    public String delete(){
        myService.delete(100);
        return "ok";
    }

    @RequestMapping("find")
    public String findOne(){
        myService.findOne(100);
        return "ok";
    }
}
